1 Introduction

Since its initial inception, optical holography has gained wide acceptance as a reliable means of reconstructing a field’s phase information from intensity-based images, i.e., holograms [1,2,3,4]. Holography has been usefully applied in biomedical imaging [3], cryptography [4], data storage [5, 6], and entertainment [7]. The classical holographic technique can be broadly classified under two general headings depending on type of recording process employed. Type (i), Optical Holography [8] involves the use of coherent light sources, e.g., Lasers, or lower coherence sources, e.g., LEDs, and optical components such as lenses, mirrors, and typically involves free space propagation. The implementation and stability of such physical systems can be challenging, furthermore the use of coherent sources results in speckle (multiplicative noise) which can significantly degrade the hologram quality. Type (ii), Computer Generated Hologram (CGH) are synthesized using digital computers [7]. They therefore typically are less physically constrained than optically recorded holograms. Nevertheless, the full three-dimensional (3D) information of objects is needed to synthesise the holograms, and this may not be viable for all scenarios.

Methods to generate holograms under spatially incoherent light illumination have been reported [9,10,11]. In a previous work, we demonstrated a single-shot imaging method for generating (Fourier) holograms from multiple perspective 2D images, known as Elemental Images (EIs) [12]. In that work, it was also shown that hologram generation is possible even under low light level (i.e., photon counting) illumination conditions. This approach does not require the complex optics, optoelectronics alignment, access to coherent light source, and controlled laboratory environment of the more traditional holographic system. However as indicated, to generate such holograms, a large number of EIs have to be processed, making this technique computationally expensive.

Sparse Representation (SR) is widely used by those in the signal processing research community to faithfully reconstruct signals from fewer measurements, commonly referred to as sparse coefficients. Applications of SR have been successfully demonstrated in a number of research fields, e.g., object recognition [13], denoising [14], and image compression [15].In general, SR methods approximate the signal/image with linear combinations of fewer basis functions (known as atoms) and these samples can be used to reconstruct the original signal/image, with zero or minimal error. A set of these atoms represented in the form of a matrix is called a dictionary. Based on the type of dictionary, SR can be broadly classified into two approaches: (a) analytic and (b) learning based approach [16].In analytic based SR methods, an implicit dictionary involving fixed basis functions, e.g., wavelets [17, 18], curvelets [19], and shearlets [20], are used. Thus, these implicit dictionaries represent a signal in a sparse form using a fixed number of coefficients. It is to be noted that implicit dictionaries lack adaptability as they apply predefined basis functions and fail to reconstruct the complex data [21].

To overcome these limitations, a learning-based approach known as dictionary learning (DL) with adaptive dictionaries (or) explicit dictionaries are widely used. In explicit dictionaries, atoms are determined (learned) from the training data. The approach has been shown to result in improved accuracy when used for image reconstruction [22]. In general, sparse representation based on DL involves two major steps: (1) sparse coding and (2) dictionary update. During the sparse coding stage, the dictionary is fixed, and the sparse coefficients of the signal are estimated. During the dictionary update step, the dictionary is updated iteratively given fixed sparse coefficients, until the approximation to the signal converges [23]. Various types of algorithms have been proposed to estimate the sparse coefficients, e.g., greedy approaches[Matching pursuit (MP) and orthogonal matching pursuit (OMP)], thresholding-based approaches (hard and soft thresholding) and homotopy approaches (least angle regression, least absolute shrinkage and selection operators) [24].

Similarly, for dictionary update, various approaches have also been proposed, for instance: Method of optimal directions (MOD) and K-Singular Value Decomposition (K-SVD) [25], Online Dictionary Learning [26], Lagrange dual method [27] and Sequential Generalised K-means (SGK) [14]. Of these, SGK is the most preferred dictionary update method for higher dimensional data denoising and reconstruction, as it is computationally efficient [28]. As noted, computational complexity is one of the major limitations on integral Fourier hologram generation. Therefore, in this work, for the first time, the computationally efficient SGK method is used to perform sparse reconstruction of synthesized integral hologram.

The rest of the paper is organised as follows: Sect. 2 introduces the basics of integral Fourier hologram generation process and SGK dictionary update method. Experimental and simulation results are presented in Sect. 3. Finally, a conclusion is provided in Sect. 4.

2 Methodology

2.1 Fourier integral hologram

This section briefly discusses the generation of integral hologram from 2D perspective images. A combination of a camera and a lenslet array captures multiple 2D Elemental Images (EIs). The result describes a projection geometry, i.e., a geometrical relationship between a scene and the corresponding view imaged at the camera plane. Using these captured EIs, grouping pixels from same location in every EI, multiple Orthographic Projection Images (OPIs) can be generated, see Fig. 1a. Each OPIs is then numerically Fourier transformed and integrated to produce one pixel in the synthesized hologram (red colour dot in Fig. 1b). Repeating this process for all OPIs, the Fourier hologram of the 3D object can be synthesized. A detailed description of the integral Fourier hologram generation process is presented in [12], further details are not given here.

Fig. 1
figure 1

Integral Fourier Hologram Generation process. a EIs to OPIs generation and b OPIs to Fourier Hologram generation

2.2 Dictionary learning method

Let \(S\) be the integral Fourier Hologram generated by the process described in Sect. 2.1, which is complex. We then apply our proposed technique to the amplitude of the hologram i.e., amp (Hologram). This process is mathematically represented as follows:

$$Z = \left| S \right|$$
(1)

The main objective of the proposed method is hologram reconstruction \(Z \in R^{M \times N}\) from sparse samples with zero or minimal error. As mentioned, the amplitude of Fourier hologram can be modelled as a linear combination of atoms as follows:

$$Z = A \beta ,$$
(2)

where \(A \in R^{M \times K}\) is an overcomplete dictionary, and \(\beta\) ∈ \(R^{K \times N}\) is a sparse coefficient matrix of the Fourier hologram. The dictionary \(A\) with \(n\) atoms is represented as:

$$A = \left[ {a_{1} , a_{2} , a_{3} \ldots .a_{n} } \right]$$
(3)

In Eq. (2), dictionary \(A\) and sparse coefficient matrix \(\beta\) are unknowns. To estimate these, a cost function, with different constraints such as sparsity or error constraints, is used. Mathematically, the cost function based on sparsity constraint is given as:

$$\left( {\left\{ {\hat{\beta }_{i} } \right\}_{i = 1}^{N} ,\hat{A}} \right) = \arg \,\mathop {\min }\limits_{{\beta_{i, A} }} \sum\nolimits_{i = 1}^{N} {\left\| {Z_{i} - A\beta_{i} } \right\|}_{2}^{2} .{\text{subject to }}\left\| {\beta_{i} } \right\|_{0} \le T,$$
(4)

where \(T\) is the sparsity level and \(i\) indicates the column number. The cost function based on error constraint is given as:

$$\left( {\left\{ {\hat{\beta }_{i} } \right\}_{i = 1}^{N} ,\hat{A}} \right) = \arg \,\mathop {\min }\limits_{{\beta_{i,A} }} \sum\nolimits_{i = 1}^{N} {\left\| {\beta_{i} } \right\|_{0} } ,{\text{subject}}\,{\text{to}}\,\left\| {Z_{i} - A\beta_{i} } \right\|_{2}^{2} \le {\upvarepsilon },$$
(5)

where \({\upvarepsilon }\) is the error threshold. Using Lagrangian multipliers, Eqs. (4), (5) can be simplified as follows:

$$\left( {\left\{ {\hat{\beta }_{i} } \right\}_{i = 1}^{N} ,\hat{A}} \right) = \user2{ }\arg \, \mathop {\min }\limits_{{\beta_{i, A} }} \sum\nolimits_{i = 1}^{N} \frac{1}{2} \left\| {Z_{i} - A\beta_{i} } \right\|_{2}^{2} + \lambda \left\| {\beta_{i} } \right\|_{0} ,$$
(6)

where \(\lambda\) is the regularization parameter. In general, patch-based DL methods are commonly used when training dataset is not largely available [29]. In this process, the data are divided into patches and each patch is reconstructed separately. In our work, we used the patch-based DL method with cost function which is defined as [30]:

$$\left( {\hat{\beta },\hat{A}} \right) \in {\text{arg }}\mathop {\min }\limits_{\beta ,A} \sum\nolimits_{i,j} \frac{1}{2} \left\| {R_{i,j} \left( Z \right) - A\alpha_{i,j} } \right\|_{2}^{2} + \lambda \left\| {\alpha_{i,j} } \right\|_{1} ),$$
(7)

where, \(R_{i,j}\) is the patch selection operator, which extracts the patches from the generated hologram \(Z\) at position \(\left( {i, j} \right)\), and \(\alpha_{i,j}\) is the sparse decomposition of \(R_{i,j} \left( Z \right)\) in the dictionary \(A\).We note that the dictionary \(A\) and sparse coefficient matrix \(\beta\),in Eq. (7), are estimated using SGK dictionary learning (SGK-DL) method via two steps iteration process. The flowchart of the proposed SGK-DL method is given in Fig. 2. The dictionary is initialised with Discrete Cosine Transform (DCT) and in the first step, sparse coding was performed through greedy Orthogonal Matching Pursuit (OMP) algorithm which estimates the sparse coefficients (\(\hat{\beta })\) by an orthogonal projection of each atom of the dictionary on to the residual. Then, in the second step, dictionary is updated by arithmetic average of training data, i.e., samples of hologram [28]. As indicated, these two steps are iteratively performed until the hologram model gets into convergence. After the convergence, the reconstructed magnitude hologram is given as follows:

$$\hat{Z} = \hat{A}\hat{\beta }$$
(8)
Fig. 2
figure 2

SGK dictionary learning method’s workflow

3 Experimental results

In our experiments, a lens array with identical elemental lenses of \(1 mm \times 1 mm\) pitch and \(3.3 mm\) focal length is used. Figure 3a shows the 3D object, with the size of \(4 cm \times 4 cm\), used in our experiment. To note, the object was kept at approximately \(50\user2{ }mm\) from our imaging system. A detailed hologram generation process with all required parameter is presented in [12], and is not discussed further here. Figure 3 depicts the images that are obtained from our experiments. The inset images in Fig. 3b, c indicate the clear difference between the perspective-based and orthographic projection-based images.

Fig. 3
figure 3

Reconstruction results: a 3D object used in our experiment, b captured elemental images, c generated orthographic projection images, d generated integral Fourier Hologram, e hologram reconstruction at depth = 32 mm and f reconstructed hologram at depth = 85 mm, g reconstructed Fourier hologram at ideal depth location, e the reconstructed hologram (PSNR 34.10 dB) through SGK-DL method with 89% sparsity and f reconstructed hologram (PSNR 42.19 dB) with 78% sparsity. To note, thresholding is not opted

Figure 3d depicts the hologram synthesized as explained in Sect. 2.1. Figure 3e, f shows the hologram reconstructed at different locations and Fig. 3g shows the hologram reconstructed at \(50\user2{ }mm\). To test the performance of our proposed work, we chose the patch size as \(3 \times 1\), the dictionary size as \(3 \times 9\) and the number of iterations is set to \(10\). As it can be seen, we can reconstruct hologram with zero or minimal error (see Fig. 3h, i) even when the sparsity level is set to 89 and 78%, i.e., only 11 and 22% of original hologram data has been utilised to reconstruct the full hologram. We note that typically when using SGK-DL method, better reconstruction results are achieved when parameters such as patch size, dictionary size, sparsity level and number of iterations are properly selected. Of these, sparsity level \(\left( T \right)\) is a critical parameter, which can be further tuned based on the thresholding approaches employed. By optimising thresholding, good quality reconstruction with better PSNR can be achieved.

4 Conclusion

In this work, a method for hologram reconstruction based on the use of a fast dictionary learning approach is presented. In this process, the amplitude of an integral hologram is transformed into sparse coefficients and reconstruction is performed with fewer samples. Sparse coding and dictionary update are implemented in an iterative manner, until the reconstructed data reach a converging point. An orthogonal matching pursuit algorithm is used to solve for the sparse coefficients and arithmetic average of training data samples is performed for the dictionary update. The proposed method is shown to achieve better reconstruction in terms of PSNR. It is expected that the parameters involved in the dictionary learning method, i.e., dictionary size, sparsity level, and number of iterations, significantly impact the reconstruction quality. Therefore, in our future work, we aim to develop an adaptive selection of parameters with various thresholding values in the dictionary learning method for better reconstruction results.